/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package multimedia;

/**
 *
 * @author thomas
 */
public class AudioSongModel {

    private String _myTitle = "";
    private String _myArtist = "";
    private String _myAlbum = "";
    private String _myDate = "";
    private String _myComment = "";
    private String _myCopyright = "";
    private String _myPath = "";
    
    private int _myDuration = 0;
    private int _myTotalDuration = 0;

    public AudioSongModel() {
    }

    /**
     * @return the _myTitle
     */
    public String getTitle() {
        return _myTitle != null ? _myTitle : "Inconnu";
    }

    /**
     * @param myTitle the _myTitle to set
     */
    public void setTitle(String myTitle) {
        this._myTitle = myTitle;
    }

    /**
     * @return the _myArtist
     */
    public String getArtist() {
        return _myArtist != null ? _myArtist : "Inconnu";
    }

    /**
     * @param myArtist the _myArtist to set
     */
    public void setArtist(String myArtist) {
        this._myArtist = myArtist;
    }

    /**
     * @return the _myAlbum
     */
    public String getAlbum() {
        return _myAlbum != null ? _myAlbum : "Inconnu";
    }

    /**
     * @param myAlbum the _myAlbum to set
     */
    public void setAlbum(String myAlbum) {
        this._myAlbum = myAlbum;
    }

    /**
     * @return the _myDate
     */
    public String getDate() {
        return _myDate != null ? _myDate : "Inconnu";
    }

    /**
     * @param myDate the _myDate to set
     */
    public void setDate(String myDate) {
        this._myDate = myDate;
    }

    /**
     * @return the _myComment
     */
    public String getComment() {
        return _myComment != null ? _myComment : "Inconnu";
    }

    /**
     * @param myComment the _myComment to set
     */
    public void setComment(String myComment) {
        this._myComment = myComment;
    }

    /**
     * @return the _myCopyright
     */
    public String getCopyright() {
        return _myCopyright != null ? _myCopyright : "Inconnu";
    }

    /**
     * @param myCopyright the _myCopyright to set
     */
    public void setCopyright(String myCopyright) {
        this._myCopyright = myCopyright;
    }

    /**
     * @return the _myPath
     */
    public String getPath() {
        return _myPath != null ? _myPath : "Inconnu";
    }

    /**
     * @param myPath the _myPath to set
     */
    public void setPath(String myPath) {
        this._myPath = myPath;
    }

    /**
     * @return the _myTime
     */
    public int getDuration() {
        return _myDuration;
    }

    /**
     * @param myTime the _myTime to set
     */
    public void setDuration(int myTime) {
        this._myDuration = myTime;
    }

    /**
     * 
     * @param myTime the time to add at current duration
     */
    public void addDuration(int myTime) {
        this._myDuration += myTime;
    }

    /**
     * @return the _myTotalDuraction
     */
    public int getTotalDuration() {
        return _myTotalDuration;
    }

    /**
     * @param myTotalDuration the _myTotalDuraction to set
     */
    public void setTotalDuration(int myTotalDuration) {
        this._myTotalDuration = myTotalDuration;
    }

    @Override
    public String toString() {
        return getArtist() + " - " + getTitle();
    }

    /**
     * Get a string with all informations about a song
     * @return String formatted with lines return (\n)
     */
    public String toCompleteString() {
        return "Titre: " + _myTitle + "\n"
                + "Artiste: " + _myArtist + "\n"
                + "Album: " + _myAlbum + "\n"
                + "Path: " + _myPath + "\n"
                + "Date: " + _myDate + "\n"
                + "Commentaire: " + _myComment + "\n"
                + "Copyright: " + _myCopyright + "\n"
                + "Durée: " + _myDuration + " / " + _myTotalDuration;
    }
}
